/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:35
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:35
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL

/* 会员信息 */
// 新增会员信息
const memberInfoCreate = (params) => axios.post(baseUrl + url.memberInfo.create, params)

// 删除会员信息
const memberInfoDelete = (id) => axios.delete(baseUrl + url.memberInfo.delete + `/${id}`)

// 修改会员信息
const memberInfoUpdate = (params, id) => axios.post(baseUrl + url.memberInfo.update + `/${id}`, params)

// 获取某个会员信息
const memberInfoLoad = (id) => axios.get(baseUrl + url.memberInfo.load + `/${id}`)

// 获取会员信息列表
const memberInfoPage = (params) => axios.get(baseUrl + url.memberInfo.page, { params })

export default {
    memberInfoCreate,
    memberInfoDelete,
    memberInfoUpdate,
    memberInfoLoad,
    memberInfoPage,
}